package classesdemo;

import java.text.MessageFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;

/**
 * Created by pc on 2015/2/16.
 * 测试国际化输出* 
 */
public class I18NTest {
   public static void main(String args[]) {
       Locale myLocal = Locale.getDefault(Locale.Category.FORMAT);
       ResourceBundle bundle = ResourceBundle.getBundle("mess", myLocal);
       String toFormat = bundle.getString("hello");
       System.out.println(MessageFormat.format(toFormat, "国际商用机器", new Date()));

   }
}
